<!doctype html>
<html lang="zh-CN">

<head>
    <title>
        #if(C.get('language')=='ch')
            服务通告
        #else
            Service Bulletins
        #end
    </title>
    <!-- Required meta tags -->
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <link rel="shortcut icon" type="image/x-ico" href="favicon.ico" />
    <!-- Bootstrap CSS -->
    #if(C.get('language')=='ch')
    <link rel="stylesheet" href="css/bootstrap.min.css">
    <link rel="stylesheet" href="css/all.min.css">
    <link rel="stylesheet" href="css/style.min.css">
    #else
    <link rel="stylesheet" href="en/css/bootstrap.min.css">
    <link rel="stylesheet" href="en/css/all.min.css">
    <link rel="stylesheet" href="en/css/style.min.css">        
    #end
    <link rel="stylesheet" href="layui/css/layui.css" media="all">
    <script src="layui/layui.js"></script>
</head>

<body>
    <div class="flex-container">
        <nav class="nav top-nav">
            <div class="container">
                <div class="row">
                   #include("language.html")
                </div>
            </div>
        </nav>
        <header class="masthead mb-auto">
            <div class="inner logo">
                <div class="webtitle">
                    <div class="title-h3 masthead-brand">国产飞机运营伙伴当局信息系统</div>
                    <div class="title-h4">Platform among CAAC MOU Partners for China-Made Aircraft</div>
                </div>
                #if(C.get('language')=='ch')
                    #include("mainnav.html")
                #else
                    #include("mainnav_en.html")
                #end
                
                <div class="search-form">
                    #include("searchhead.html")
                </div>
            </div>
            
            #if(C.get('language')=='ch')
                #include("menu.html")
            #else
                #include("menu_en.html")
            #end
        </header>
        <div class="container">
            <div class="page-title">
                
                #if(C.get('language')=='ch')
                    服务通告
                #else
                    Service Bulletins
                #end
                
            </div>
            
            #if(C.get("model"))
                #set(cmodel = C.get("model"))
              #else
                #articleMetaList(id=2)
                    #for(s:values)
                        #set(cmodel = s)
                        #break
                    #end
                  #end
              #end
            
            <div class="row">
                
                <div class="col-md-3 col-sm-12 left-bar">
                    #articleMetaList(id=2)
                    <ul class="list-group list-group-flush">
                        #for(s:values)
                        <li class="list-group-item">
                            <a href="?model=#(s)&language=#(C.get('language'))" #if(cmodel == s) style="color: red" #end>
                                #(s)
                            </a>
                        </li>
                        #end
                    </ul>
                    <br/>
                    #end
                </div>
                
                <div class="col-md-9 col-sm-12 right-list">
                    <nav class="breadcrumb">
                        <a class="breadcrumb-item" href="#if(C.get('language')=='ch') /index_ch #else / #end">
                        #if(C.get('language')=='ch')
                            首页
                        #else
                            Home
                        #end
                        </a>
                        <a class="breadcrumb-item" href="#">
                            
                        #if(C.get('language')=='ch')
                            服务通告
                        #else
                            Service Bulletins
                        #end
                        </a>
                        <span class="breadcrumb-item active">
                        
                        #if(C.get('model'))
                         #(C.get('model'))
                        #end
                        
                        </span>
                    </nav>
                    #include("servicebulletins_search.html")
                    #if(C.get('language')=='ch')
                        #set(tagid= 43)
                    #else
                        #set(tagid= 44)
                    #end
                    #if(USER)
                    #ServiceBulletinsList()
                    <table class="table table-striped" id="data">
                        <thead>
                            <tr class="olfont">
                                #if(C.get('language')=='ch')
                                <th style="width:10%">通告编号</th>
                                <th style="width:10%">版次</th>
                                <th style="width:44%">标题</th>
                                <th>颁发单位</th>
                                <th>发布日期</th>
                                #--<th>机型</th>--#
                                
                                #else
                                <th>SB NO.</th>
                                <th>Revision</th>
                                <th style="width:40%">Subject</th>
                                <th>Issued By</th>
                                <th style="width:16%">Issued Date</th>
                                #--<th>Model</th>--#
                                #end
                            </tr>
                        </thead>
                        <tbody>
                            #for(entity:ServiceBulletinsList.list)
                            <tr>
                                <td>#(entity.circular_number ??)</td>
                                <td>#(entity.edition ??)</td>
                                <td>
                                    #if(C.get('language')=='ch')
                                        #--<a href="/servicebulletins/details?id=#(entity.id)&language=#(C.get('language'))">#(entity.title ??)</a>--#
                                        <a href="#(entity.enclosure)" target="_blank">#(entity.title ??)</a>
                                    #else
                                        #--<a href="/servicebulletins/details?id=#(entity.id)&language=#(C.get('language'))">#(entity.title_en ??)</a>--#
                                        <a href="#(entity.enclosure_en)" target="_blank">#(entity.title_en ??)</a>
                                    #end
                                </td>
                                <td>#(entity.lssuing_unit ??)</td>
                                <td>
                                    #if(C.get('language')=='ch')
                                    #date(entity.release_date, "yyyy-MM-dd")
                                    #else
                                    #date(entity.release_date, "dd-MM-yyyy")
                                    #end
                                </td>
                                #--<td>#(entity.model ??)</td>--#
                            </tr>
                            #end
                        </tbody>
                    </table>
                    
                    
                    #if(C.get('language')=='ch')
                    
                    <!--分页代码-->
                    #ServiceBulletinsPaginate()
                    <nav aria-label="Page navigation example" class="mt-4">
                        <ul class="pagination justify-content-center ">
                            #for(page : pages)
                            <li class="page-item #(page.style ??)">
                                <a class="page-link" href="#(page.url ??)?language=#(C.get('language'))">
                                    #(page.text ??)
                                </a>
                            </li>
                            #end
                        </ul>
                    </nav>
                    #end
                       
                    #else
                        
                    <!--分页代码-->
                    #ServiceBulletinsPaginate()
                    <nav aria-label="Page navigation example" class="mt-4">
                        <ul class="pagination justify-content-center ">
                            #for(page : pages)
                            <li class="page-item #(page.style ??)">
                                <a class="page-link" href="#(page.url ??)?language=#(C.get('language'))">
                                    #if(page.text == "上一页")
                                    Previous page
                                    #elseif(page.text == "下一页")
                                    next page
                                    #else
                                    #(page.text)
                                    #end
                                </a>
                            </li>
                            #end
                        </ul>
                    </nav>
                    #end
                    
                    #end
                    
                    #end
                    
                    #end
                </div>
            </div>
        </div>
    </div>
    #include("bottom.html")

    <!-- Optional JavaScript -->
    <!-- jQuery first, then Popper.js, then Bootstrap JS -->
    <script src="js/jquery-3.3.1.min.js"></script>
    <script src="js/popper.min.js"></script>
    <script src="js/bootstrap.min.js"></script>
</body>

</html>